package com.tdam2011;


import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class Grupo7Activity extends TabActivity {

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.main);

	    Resources res = getResources(); 
	    TabHost tabHost = getTabHost();  
	    TabHost.TabSpec spec; 
	    Intent intent;  

	    intent = new Intent().setClass(this, Contactos.class);
	    spec = tabHost.newTabSpec("contactos").setIndicator("Contactos",
	                      res.getDrawable(R.drawable.ic_tab_contactos))
	                  .setContent(intent);
	    tabHost.addTab(spec);	    
	    

	    intent = new Intent().setClass(this, Historial.class);
	    spec = tabHost.newTabSpec("historial").setIndicator("Historial",
	                      res.getDrawable(R.drawable.ic_tab_historial))
	                  .setContent(intent);
	    tabHost.addTab(spec);

	   
	    intent = new Intent(this, 
                Preferencias.class);
	    spec = tabHost.newTabSpec("preferencias").setIndicator("Preferencias",
	                      res.getDrawable(R.drawable.ic_tab_preferencias))
	                  .setContent(intent);
	    tabHost.addTab(spec);


	    tabHost.setCurrentTab(0);
	}

	public void f_salir() {
		setResult(RESULT_OK);
		finish();
	}
}